<?php

//插件模块，用于显示插件
class emptyMod extends commonMod
{

    public function _empty()
    {

        header("content-type:text/html; charset=utf-8");
        $module_name = in($_GET['_module']); //操作模块
        $action_name = in($_GET['_action']); //操作方法

        
        if (Plugin::run($module_name, $action_name) == false) {

        
        if (substr($module_name, 0, 5) == 'index') {
            //处理blogurl
            $index=explode('-', $module_name);
            $_GET[0] == $index[1];
            module('index')->index();
            return;

        }
        
        if (substr($action_name, 0, 5) == 'index') {


            //如果操作等于index 处理一级
            $condition['pinyin'] = $module_name; //栏目拼音等于模块操作
        } else {
            if ($_GET[0] == '') { //处理二级
                $condition['pinyin'] = $action_name; //栏目拼音等于模块方法
            } else {
                if (substr($_GET[0], 0, 5) == 'index') {
                    $condition['pinyin'] = $action_name;
                } else {
                    //处理多级
                    $action_id = end(explode('/', $_GET[0])); //切割操作值
                    if (substr($action_id, 0, 5) == 'index') {
                        $condition['pinyin'] = end(explode('/', substr($_GET[0], 0, strlen($_GET[0]) - 6)));
                    } else {
                        $condition['pinyin'] = $action_id;
                    }
                }

            }
        }

        if ($channel_info = $this->model->table('channel')->where($condition)->find()) { //执行栏目查询操作

            $_GET[0] = $channel_info['id'];
            module('list')->index();
        } else {

            if (is_numeric($_GET[0])) {
                //处理二级栏目内容
                $_GET[0] = $_GET[0];

            } else {
                //处理一级级栏目内容
                if (is_numeric($action_name)) {
                    $_GET[0] = $action_name; //处理一级
                } else {
					if($_GET[0]<>''){
                    $action_id = end(explode('/', $_GET[0]));
                    $_GET[0] = $action_id;
					}else{
					$_GET[0] = $action_name;
					}
                }
            }
            module('content')->index(); //直接跳转到内容模块

        }

        

        }


    }

}



?>